package ut

/**
 * @author ljfirst
 * @version V1.0
 * @date 2023/7/24 10:55
 * @author-Email ljfirst@mail.ustc.edu.cn
 * @blogURL https://blog.csdn.net/ljfirst
 * @description
 **/

func AAA(n int) {
	ans := make([][]int, n, n)
	for i := 0; i < n; i++ {
		ans[i] = make([]int, n, n)
	}
	m := 0
	loop := 0
	cycle := 1
	for m < n*n {
		ans[cycle-1][cycle-1+loop] = m
		ans[cycle-1+loop][n-1] = m + 1
		ans[n-1-cycle][n-1-loop] = m + 2
		ans[n-1-loop][cycle-1] = m + 3
		m += 4
		loop++
		if loop == n-1-cycle {
			loop = 0
			cycle++
		}
	}
}

